package com.mycode.memento19.resolve;

import java.util.ArrayDeque;
import java.util.Deque;

public class MementoListCaretaker {

    private Deque<ChessmanMemento> mementos = new ArrayDeque<>();

    public void addMemento(ChessmanMemento memento) {
        mementos.push(memento);
    }

    public ChessmanMemento getMemento() {
        return mementos.pop();
    }
}
